package com.tinysand.advert.service;

import com.tinysand.advert.entity.AdvertPlan;
import com.tinysand.advert.exception.AdvertException;
import com.tinysand.advert.support.AdPlanGetRequest;
import com.tinysand.advert.support.AdPlanRequest;
import com.tinysand.advert.support.AdPlanResponse;

import java.util.List;

/**
 * 推广计划服务接口定义
 *
 * Created By TINY
 * Create Time 2020/2/21
 **/
public interface AdPlanService {

    /**
     * 创建推广计划
     *
     * @param request 创建推广计划的请求数据对象 {@link AdPlanRequest}
     * @return 推广计划创建结果响应对象 {@link AdPlanResponse}
     * @throws AdvertException 业务异常
     */
    AdPlanResponse createAdPlan(
            AdPlanRequest request) throws AdvertException;

    /**
     * 根据请求获取所有指定的推广计划
     *
     * @param request 获取推广计划的请求对象 {@link AdPlanGetRequest}
     * @return 所有符合的推广计划
     * @throws AdvertException 业务异常
     */
    List<AdvertPlan> getAdPlanByIds(
            AdPlanGetRequest request) throws AdvertException;

    /**
     * 更新指定的推广计划数据
     *
     * @param request 更新推广计划的请求对象 {@link AdPlanGetRequest}
     * @return 推广计划更新结果响应对象 {@link AdPlanResponse}
     * @throws AdvertException 业务异常
     */
    AdPlanResponse updateAdPlan(
            AdPlanRequest request) throws AdvertException;

    /**
     * 删除推广计划
     *
     * @param request 删除推广计划的请求对象 {@link AdPlanGetRequest}
     * @throws AdvertException 业务异常
     */
    void deleteAdPlan(AdPlanRequest request) throws AdvertException;
}
